#define _CRT_SECURE_NO_WARNINGS
//#include <stdio.h>
//int main()
//{
//	int year = 0;
//	int month = 0;
//	int day = 0;
//	scanf("%d%*c%d%*c%d", &year, &month, &day);
//	printf("%d %d %d", year, month, day);
//
//	return 0;
//}





//#include <stdio.h>
//int main()
//{
//	int year = 0;
//	int month = 0;
//	int day = 0;
//	scanf("%d%*d%d%*d%d", &year, &month, &day);
//	printf("%d %d %d", year, month, day);
//
//	return 0;
//}





#include <stdio.h>
int main()
{
	int year = 0;
	int month = 0;
	int day = 0;
	scanf("%d%*f%d%*f%d", &year, &month, &day);
	printf("%d %d %d", year, month, day);

	return 0;
}